package com.jiyun.passenger.controller;

import com.jiyun.passenger.service.CartTypeService;
import com.jiyun.pojo.CarType;
import com.jiyun.result.Result;
import io.swagger.v3.oas.annotations.parameters.RequestBody;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/cart")
public class CartTypeController {
    @Autowired
    CartTypeService cartTypeService;
    @PostMapping("/findByCartTypeList")
    public Result findCartTypeList(@RequestBody CarType cartType) {
        List<CarType> cartTypeList = cartTypeService.findCartTypeList(cartType);
        return Result.ok(cartTypeList);
    }
}
